/**********************************************
这是代码自动生成的，如果重新生成，所做的改动将会丢失
系统:gpssolution
模块:系统平台
Itop.com 版权所有
生成者：Rabbit
生成时间:2012-8-6 15:23:07
***********************************************/

using System;
using System.Threading;
using System.ComponentModel;
namespace Itop.GpsCar.Model
{
    /// <summary>
    ///[rolecolumn]业务实体类
    ///对应表名:rolecolumn
    /// </summary>
    [Serializable]
    public class rolecolumn
    {
        
        #region Private 成员
        private string _roleid=Newid(); 
        private string _tablename=String.Empty; 
        private string _columnname=String.Empty; 
        private byte _coladd=0; 
        private byte _coledit=0; 
        private byte _coldelete=0; 
        private byte _colview=0; 
        private DateTime _timestamp=new DateTime(1900,1,1);   
        #endregion
  
  
        #region Public 成员
   
        /// <summary>
        /// 属性名称：roleid
        /// 属性描述：
        /// 字段信息：[roleid],VARCHAR
        /// </summary>
        [Browsable(false)]
        [DisplayNameAttribute("")]
        public string roleid
        {
            get { return _roleid; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[]长度不能大于50!");
                if (_roleid as object == null || !_roleid.Equals(value))
                {
                    _roleid = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：tablename
        /// 属性描述：
        /// 字段信息：[tablename],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string tablename
        {
            get { return _tablename; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[]长度不能大于50!");
                if (_tablename as object == null || !_tablename.Equals(value))
                {
                    _tablename = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：columnname
        /// 属性描述：
        /// 字段信息：[columnname],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string columnname
        {
            get { return _columnname; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[]长度不能大于50!");
                if (_columnname as object == null || !_columnname.Equals(value))
                {
                    _columnname = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：coladd
        /// 属性描述：
        /// 字段信息：[coladd],TINYINT
        /// </summary>
        [DisplayNameAttribute("")]
        public byte coladd
        {
            get { return _coladd; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 0)
                throw new Exception("[]长度不能大于0!");
                if (_coladd as object == null || !_coladd.Equals(value))
                {
                    _coladd = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：coledit
        /// 属性描述：
        /// 字段信息：[coledit],TINYINT
        /// </summary>
        [DisplayNameAttribute("")]
        public byte coledit
        {
            get { return _coledit; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 0)
                throw new Exception("[]长度不能大于0!");
                if (_coledit as object == null || !_coledit.Equals(value))
                {
                    _coledit = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：coldelete
        /// 属性描述：
        /// 字段信息：[coldelete],TINYINT
        /// </summary>
        [DisplayNameAttribute("")]
        public byte coldelete
        {
            get { return _coldelete; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 0)
                throw new Exception("[]长度不能大于0!");
                if (_coldelete as object == null || !_coldelete.Equals(value))
                {
                    _coldelete = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：colview
        /// 属性描述：
        /// 字段信息：[colview],TINYINT
        /// </summary>
        [DisplayNameAttribute("")]
        public byte colview
        {
            get { return _colview; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 0)
                throw new Exception("[]长度不能大于0!");
                if (_colview as object == null || !_colview.Equals(value))
                {
                    _colview = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：timestamp
        /// 属性描述：
        /// 字段信息：[timestamp],TIMESTAMP
        /// </summary>
        [DisplayNameAttribute("")]
        public DateTime timestamp
        {
            get { return _timestamp; }
            set
            {			
                if (_timestamp as object == null || !_timestamp.Equals(value))
                {
                    _timestamp = value;
                }
            }			 
        }
  
        #endregion 
  
        #region 方法
        public static string Newid(){
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        public string CreateID(){
            Thread.Sleep(new TimeSpan(100000));//0.1毫秒
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        #endregion		
    }	
}
